package com.contract.spirit.manage

import cn.woochen.comlib.util.UserPref
import com.contract.commonlib.config.Constants
import com.contract.commonlib.util.ext.jsonToEntity
import com.contract.spirit.bean.entity.User
import com.contract.spirit.bean.response.VersionInfoResponse

/**
 * @author: witness
 * created: 2021/9/22
 * desc:
 */
object CommonConfigManager {
    var configInfo by UserPref(Constants.CONFIGINFO, "")
    var userinfo by UserPref(Constants.USERINFO,"")

    val userInfoResponse by lazy {
        jsonToEntity<User>(userinfo)
    }

    val configInfoResponse by lazy {
        jsonToEntity<VersionInfoResponse>(configInfo)
    }
}